home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4604 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  844 b 

  1. Path: news.ov.com!news
  2. From: glenn@ov.com (Fletcher.Glenn@ov.com)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: a question on "return"
  5. Date: 6 Feb 1996 01:08:27 GMT
  6. Organization: OpenVision
  7. Message-ID: <4f69mb$5s0@spanky.pls.ov.com>
  8. References: <4f2ipq$kaf@srvr1.engin.umich.edu>
  9. Reply-To: glenn@ov.com
  10. NNTP-Posting-Host: foghorn.pls.ov.com
  11.  
  12. In article kaf@srvr1.engin.umich.edu, cjlin@news-server.engin.umich.edu (Chih-Jen Lin) writes:
  13. >In C, usually we treat 1 as true and 0 as false.
  14. >However, we usually use return(0) after normal end of an int
  15. >function and return(1) when some errors happen.
  16. >Can some one tell me why we return a false value after normal 
  17. >end of a function ?
  18. >
  19. >Thanks in advance.
  20. >
  21. >Chih-Jen Lin 
  22.  
  23.  
  24. Because the return convention is True = Error.  This is not a C convention,
  25. but a system convention.
  26.  
  27.             Fletcher.Glenn@ov.com
  28.  
  29.  
  30.